package ciyuan.ChangeMinecraft;

import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.Attributes;
import net.minecraftforge.event.entity.player.PlayerContainerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;

/**
 * @author 150149
 */
//@Mod.EventBusSubscriber
public class SetPlayerSpeed {

    @SubscribeEvent
    public static void ona(PlayerContainerEvent event) {
        event.getPlayer().getAttribute(Attributes.MOVEMENT_SPEED).addTransientModifier(new AttributeModifier("ciyuanrpgspeed",(double)0.2F, AttributeModifier.Operation.ADDITION));
    }

}
